﻿<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 
class AlonepageApp extends BaseApp
{
 
     var $type = 'alonepage';  
   
    function index()
    {
        
		$pa = $_GET['pa'];
		$pa || $pa = $_REQUEST['pa'];
        $GLOBALS['Lang']->_get_lang('alonepage');	
		require(ROOT_PATH . '/lib/nav.lib.php');
		$nav = new Nav($GLOBALS['SCup']->SCup_nav_file);
        $this->assign('category_nav_data', $nav->curnav());		
        $this->assign('navigation', $nav->_get_nav());	
        $pic_data = @include(ROOT_PATH . '/data/cache/rollpic_'.trim($GLOBALS['Lang']->_lang_tp).'.php'); 
		$this->assign('pic_data', $pic_data);	
			
	 	$categorydata = & $GLOBALS['SCup']->_get_category_data('new');
		
        $this->assign('categorydata', $categorydata);			
			
 	    $TB_alonepage = &$this->_model('alonepage'); 	 
		
		$info = $TB_alonepage->oneshow($pa);
		if($info['modue'])
		{
		$module = $info['modue'];
		}else
		{
		$module = 'alonepage.view.html';
		}
			
	        $qq_data = array();
        $qq_temp1 = del_empty_var(explode('|', QQ_SET_DATA));
		foreach($qq_temp1 as $key=>$value)
		{
           $qq_temp2 = del_empty_var(explode(':', $value));	
		   $qq_data[$qq_temp2[0]] = $qq_temp2[1];     
		}
        $this->assign('qq_data',$qq_data);	
		
		
		$TB_new = &$this->_model('new');				
		$data_index_new = $TB_new->reindex();		
        $this->assign('data_index_new', $data_index_new);		
		
		$TB_prot = &$this->_model('prot');				
		$data_index_prot = $TB_prot->reindex();		
        $this->assign('data_index_prot', $data_index_prot);			
			
        $this->assign('langdata', $GLOBALS['Lang']->_get_lang_typesdata());	 				
        $this->assign('view_charset', VIEW_CHARSET);	

        $this->assign('login_icon', $GLOBALS['SCup']->SCup_user_checking);
		$this->assign('bg_pic_url',SITE_URL.'/'.$GLOBALS['SCup']->SCup_name.'/view/'.VIEW_TYPE .'/style/'.CSS_TYPE.'/');	
        $this->assign('page_title', $info['title'].'-'.SITE_TITLE);
        $this->assign('page_description', $info['description']);
        $this->assign('page_keywords', $info['keywords']);
        $this->assign('name', $info['name']);			
		$this->assign('content', $info['content']);			
        $this->assign('langtype', trim($GLOBALS['Lang']->_lang_tp));
	    $this->assign('site_url',SITE_URL);	
		
        $this->display($module);		
		
		
    }


   
}




?>